package com.hrms.controller;


import com.hrms.pojo.SysRole;
import com.hrms.pojo.SysUser;
import com.hrms.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author LK
 * @since 2021-10-19
 */
@RestController
@RequestMapping("/sys-role")
public class SysRoleController {
	@Autowired
	SysRoleService sysRoleService;

	@RequestMapping("/list")
	public HashMap<String, Object> rolePage(SysRole a) {
		return sysRoleService.select(a);
	}
    //添加
    @RequestMapping("/add")
    public HashMap<String, Object> add(SysRole a) {
        return sysRoleService.add(a);
    }
    //更新
    @RequestMapping("/update")
    public HashMap<String, Object> update(SysRole a) {
        return sysRoleService.update(a);
    }
    //删除
    @RequestMapping("/del")
    public HashMap<String, Object> update(Integer id) {
        return sysRoleService.del(id);
    }
}

